from django.db import models
from user.models import User
from course.models import CourseModel
from utils.BaseModel import BaseModel
# Create your models here.


class Cart(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, verbose_name='用户', related_name='user')
    course = models.ForeignKey(CourseModel, on_delete=models.CASCADE, verbose_name='课程', related_name='course')
    select = models.BooleanField(default=True, verbose_name='是否选中')

    class Meta:
        db_table = 'cart'
